#ifndef _IO_VFS_H_INCLUDED_
#define _IO_VFS_H_INCLUDED_

#include <stdio.h>

#define VFSMODE_READ	1
#define VFSMODE_WRITE	2
#define VFSMODE_APPEND	3

typedef struct
{
	int type;
	union
	{
		FILE *asFile;
	};
	int size;
}TVfsFile;

TVfsFile *vfs_open(char *fname, int mode);
int vfs_read(void *buf, int size, TVfsFile *file);
int vfs_write(void *buf, int size, TVfsFile *file);
bool vfs_close(TVfsFile *file);
int vfs_getFileSize(TVfsFile *file);

#endif //_IO_VFS_H_INCLUDED_
